package com.share.bean.sysmgr.privilege;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * <p>Title：资源保护类型</p>
 * <p>Description：</p>
 * @Author：杨浩泉
 * @Date：2010-4-10
 */
@Entity
@Table(name="share_privilegeResourceItem")
public class PrivilegeResourceItem implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private int id ;
	
	private String sysItemName ;
	
	private String sysItemDesc ;
	
	private Date addDate ;
	
	private Set<PrivilegeResource> resource ;

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSysItemName() {
		return sysItemName;
	}

	public void setSysItemName(String sysItemName) {
		this.sysItemName = sysItemName;
	}

	public String getSysItemDesc() {
		return sysItemDesc;
	}

	public void setSysItemDesc(String sysItemDesc) {
		this.sysItemDesc = sysItemDesc;
	}

	public Date getAddDate() {
		return addDate;
	}

	public void setAddDate(Date addDate) {
		this.addDate = addDate;
	}

	@OneToMany(mappedBy="resItem",fetch=FetchType.EAGER)
	@JoinColumn(name="resItem_id")
	public Set<PrivilegeResource> getResource() {
		return resource;
	}

	public void setResource(Set<PrivilegeResource> resource) {
		this.resource = resource;
	}

}
